local desc_hulao_mode = [[
  # 虎牢关模式简介
  ___

  1人扮演吕布（主公），其他3人扮演反贼。若4人中有且只有1个机器人则开启PVE【神话修罗吕布】挑战模式，否则进入PVP【虎牢关吕布】模式

  PVE【神话修罗吕布】挑战模式：

      主公阵营：

      机器人主公固定为【神话修罗吕布】20体力，其初始技能拥有【神武】【神智】【神战】【马术】技能，初始装备【神话方天画戟】【神话束发紫金冠】【神话吞天铠】

      【神武】：锁定技，游戏开始把你所属得装备（神话方天画戟）（神话吞天铠）（神话束发紫金冠）置于你的装备区并且永远不能离开你的装备区，你获得武器，宝物，防具牌立刻丢弃并摸等量的牌。

      【神战】：锁定技，准备阶段多摸场上存活角色数张牌，出牌阶段你可以多使用X张【杀】（X为形态数，初始为1）。

      【神话方天画戟】:锁定技，你使用【杀】或【决斗】指向单一目标后，随机一名其他角色也成为【杀】或【决斗】目标。

      【神话束发紫金冠】：锁定技，出牌阶段，你随机对一名其他角色造成一点伤害并随机弃其一张牌。

      【神话吞天铠】：锁定技，每回合限两次，当你成为非转化单体牌的目标时，若牌的颜色为红色，你随机弃两张红色手牌对其造成1点伤害，若为黑色，你弃一张黑色手牌随机弃其一张牌；每当你受到伤害时，摸受到伤害值的牌。

      形态：（当体力小于9吕布转变第3形态。立刻结束当前角色回合，吕布获得一个额外得回合）
      
      1、获得技能【神罚】（当体力值小于15时，最大体力值-6，获得【神罚】）：锁定技，你对其他角色造成普通伤害为随机的【火】【雷】属性伤害，准备阶段与结束阶段结束时你横置所有其他角色

      2、获得技能【神变】（当体力值小于9时，最大体力值-6，获得【神变】）：锁定技，其他角色摸牌阶段结束后。其每张手牌（装备牌除外）重置为随机牌名（延时锦囊与联军盛宴除外）

      反贼阵营：

      反贼拥有技能：【汉盟】【汉誓】【汉伐】体力与最大体力+1

      【汉盟】：全部拥有【汉盟】技能角色每轮限发动1次，当有【汉盟】角色进入濒死。其他【汉盟】角色从以下选项二选一并在选完后移除该选项：1.弃所有手牌恢复其1点体力。2.弃指定的牌并摸等量牌。

      【汉誓】：摸牌阶段你多摸1张牌且手牌上限+1，其他拥有【汉誓】角色多摸1张牌。

      【汉伐】：全部拥有【汉伐】技能角色每轮限发动1次，当有【汉伐】角色对没有【汉伐】角色使用唯一目标【杀】结算后，其他拥有【汉伐】角色可以依次对其使用1张【杀】

      补充卡牌：
      
      联军盛宴：其他相同身份角色回复1点体力（若满血则其摸1张牌）。自己摸存活角色数的牌。


  虎牢关规则：

  每当反贼死亡其他反贼可选择回1血或摸两牌

  反贼选将无视开启的扩展包，只对白名单进行选择。白名单只开【浪】，【手杀专属】，【手杀-始计篇·严】，【手杀界一将】，【OL专属1】，【OL专属3】平衡将的包

  胜利规则与身份局一致。
]]
local istest = false
--pve与pve模式
local cur_mode = "pvp"
local lord_player = function ()
  return cur_mode == "pvp" and "l__hulaolvbu" or "l__xiuluolvbu"
end 

--神变随机得卡组
local randhandlist = {"slash","thunder__slash","fire__slash","jink","peach","analeptic","nullification","ex_nihilo","collateral","duel","snatch","dismantlement","savage_assault","archery_attack","amazing_grace"}

-- Because packages are loaded before gamelogic.lua loaded
-- so we can not directly create subclass of gamelogic in the top of lua
local hulao_getLogic = function()
  local hulao_logic = GameLogic:subclass("hulao_logic")

  function hulao_logic:initialize(room)
    GameLogic.initialize(self, room)
    self.role_table = {nil, nil,nil, {"lord", "rebel", "rebel","rebel"},{"lord", "rebel", "rebel","rebel","rebel"},{"lord","loyalist","rebel","rebel","rebel","loyalist"}}
  end

  function hulao_logic:prepareDrawPile()
    local room = self.room
    local allCardIds = Fk:getAllCardIds()
    --重新过滤卡组
    local filterCardIds = {}
    local while_cards = {"standard","standard_cards","maneuvering","lang_cards"}
    for i = #allCardIds, 1, -1 do
      local id = allCardIds[i]
      local card = Fk:getCardById(id)
      if card then
        if card.is_derived or not table.contains(while_cards,card.package.name) then
          table.removeOne(allCardIds, id)
          table.insert(room.void, id)
          room:setCardArea(id, Card.Void, nil)
        end
      end
      if table.contains(while_cards,card.package.name) then
        if not card.is_derived then
          table.insert(filterCardIds,id)
        end
      end
    end

    table.shuffle(filterCardIds)
    room.draw_pile = filterCardIds
    for _, id in ipairs(room.draw_pile) do
      room:setCardArea(id, Card.DrawPile, nil)
    end
  end

  function hulao_logic:assignRoles()
    local room = self.room
    local n = #room.players
    local roles = self.role_table[n]
    if not roles then
      room:doBroadcastNotify("ShowToast", "开启人数只能4或者6个人")
      room:gameOver("lord")
      return
    end
    local roles = table.clone(roles)
    table.shuffle(roles)
    if #roles == 6 then
      --开启pve修罗神话吕布
      cur_mode = "pve"
      local humans = table.filter(room.players,function (pr)
        if pr.id > 0 then
          return true
        end
      end)
      if #humans > 3 then
        room:doBroadcastNotify("ShowToast", "6人座位最多3个真人玩家")
        room:gameOver("lord")
        return
      end
      local lord_bot = table.find(room.players,function (pr)
        if pr.id < 0 then
          return true
        end
      end)
      lord_bot.role = "lord"
      lord_bot.role_shown = true
      table.removeOne(roles,"lord")
      room:broadcastProperty(lord_bot, "role")
      for i = 1, #humans do
        table.removeOne(roles,"rebel")
      end
      for i = 1, n do
        local p = room.players[i]
        if p.id < 0 then
          -- p.ai = LangAI:new(p)
        end
        if p.role ~="lord" then
          if p.id > 0 then
            p.role = "rebel"
          else
            p.role = table.random(roles)
            table.removeOne(roles,p.role)
          end
          room:notifyProperty(p, p, "role")
        end
      end
    else
      --开启pvp虎牢关吕布
      cur_mode = "pvp"
      for i = 1, n do
        local p = room.players[i]
        if p.id < 0 then
          -- p.ai = LangAI:new(p)
        end
        p.role = roles[i]
        if p.role == "lord" then
          p.role_shown = true
          room:broadcastProperty(p, "role")
        else
          room:notifyProperty(p, p, "role")
        end
      end
  end
end

  function hulao_logic:chooseGenerals()
    local room = self.room
    -- local generalNum = room.settings.generalNum
    local generalNum = 12
    for _, p in ipairs(room.players) do
      p.role_shown = true
      room:broadcastProperty(p, "role")
    end
    local lord = room:getLord()
    room.current = lord
    local nonlord = room.players

    self.allgenerals = {}
    local totalgens = Fk.generals
    local tgens = GensLimts:getToTalGens()
    local generals = {}
    for _, gen in ipairs(tgens) do
      local g = totalgens[gen]
      if g then
        table.insert(self.allgenerals,g)
        table.insert(generals,g)
      end
    end

    table.shuffle(generals)
    -- local lordname 
    -- local othergens = {}
    local enmeys = {"ol_ex__huaxiong","lijue"}
    for _, p in ipairs(nonlord) do
      local arg = {}
      if p.role == "lord" then
        table.insert(arg, lord_player())
        -- table.removeOne(generals,Fk.generals["l__hulaolvbu"])
        -- table.removeOne(generals,Fk.generals["l__xiuluolvbu"])
      else
        if p.role == "rebel" then
          for i = 1, generalNum do
            local g = table.remove(generals, 1).name
            if g then
              table.insert(arg, g)
            end
          end
        end
        if p.id < 0 and p.role == "loyalist" then
          local rand = table.random(enmeys)
          table.removeOne(enmeys,rand)
          table.insert(arg, rand)
        end
      end
      p.request_data = json.encode({ arg, 1 })
      p.default_reply = arg[1]
    end
    -- for _, p in ipairs(nonlord) do
    --   -- dbg()
    --   room:notifyMoveFocus(p, "AskForGeneral")
    --   -- room:doBroadcastRequest("AskForGeneral", p)
    --   room:setPlayerGeneral(p,p.request_data, true)
    --   room:askForChooseKingdom({p})
    --   room:broadcastProperty(p, "kingdom")
    --   room:broadcastProperty(p, "general")
    -- end
    room:doBroadcastRequest("AskForGeneral", nonlord)
    for _, p in ipairs(nonlord) do
      if p.general == "" and p.reply_ready then
        local general = json.decode(p.client_reply)[1]
        room:setPlayerGeneral(p, general, true, true)
      else
        room:setPlayerGeneral(p, p.default_reply, true, true)
      end
      p.default_reply = ""
    end

    room:askForChooseKingdom(nonlord)
    for _, p in ipairs(nonlord) do
      room:broadcastProperty(p, "general")
      if p.role == "lord" then
        room:broadcastProperty(p, "kingdom")
      end
    end
  end

  return hulao_logic
end

--虎牢关技能
--汉盟
local hulao_mengjun = fk.CreateTriggerSkill{
  name = "hulao_mengjun",
  anim_type = "control",
  frequency = Skill.Compulsory,
  events = {fk.EnterDying},
  can_trigger = function(self, event, target, player, data)
    if target == player and player:hasSkill(self.name) and player:usedSkillTimes(self.name, Player.HistoryRound) == 0 then
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    for _, p in ipairs(player.room:getOtherPlayers(player)) do
      if p.role == "rebel" and p:hasSkill(self.name) then
        p:addSkillUseHistory(self.name, 1)
      end
    end
    local tars = table.filter(room:getOtherPlayers(player),function (p)
      if p.role == "rebel" and not p:isNude() then
        return true
      end
    end) 
    local chc = {"throwallcards_rec","throwallcards_draw","Cancel"}
    for _, tar in ipairs(tars) do
      local remove_tmp
      if tar:isKongcheng() then
        remove_tmp = table.remove(chc,1)
        -- table.insert(chc,1,)
      end
      local chs = room:askForChoice(tar,chc,self.name)
      if chs == "throwallcards_rec" then
        tar:throwAllCards("h")
        room:recover{
          who = player,
          num = 1,
          recoverBy = tar,
          skillName = self.name
        }
        table.remove(chc,1)
      elseif chs == "throwallcards_draw" then
        -- body
        local cards = #tar.player_cards[Player.Hand] + #tar.player_cards[Player.Equip]
        -- tar:throwAllCards("h")
        local sel_cards = room:askForCard(tar,1,cards,true,self.name,true,".")
        if sel_cards and #sel_cards > 0 then
          room:throwCard(sel_cards, self.name, tar, tar)
          room:drawCards(tar,#sel_cards,self.name)
        end
        table.remove(chc,2)
      end

      if remove_tmp then
        table.insert(chc,1,remove_tmp)
      end
    end
  end
}
Fk:addSkill(hulao_mengjun)

--汉誓
local hulao_hanshi = fk.CreateTriggerSkill{
  name = "hulao_hanshi",
  anim_type = "support",
  frequency = Skill.Compulsory,
  events = {fk.DrawNCards},
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(self.name)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    data.n = data.n + 1
    table.forEach(room:getOtherPlayers(player),function (p)
      if p.role == "rebel" and p:hasSkill(self.name) then
        room:drawCards(p,1,self.name)
      end
    end)
  end
}
local hulao_hanshi_hmax = fk.CreateMaxCardsSkill{
  name = "#hulao_hanshi_hmax",
  correct_func = function(self, player)
    if player:hasSkill(self.name) then
      return 1
    else
      return 0
    end
  end,
}
hulao_hanshi:addRelatedSkill(hulao_hanshi_hmax)
Fk:addSkill(hulao_hanshi)

--汉伐
local hulao_hanfa = fk.CreateTriggerSkill{
  name = "hulao_hanfa",
  anim_type = "offensive",
  -- frequency = Skill.Compulsory,
  events = {fk.CardUseFinished},
  can_trigger = function(self, event, target, player, data)
    if target == player and player:hasSkill(self.name) and data.card and data.card.trueName == "slash" and #data.tos == 1 and #data.tos[1] == 1 and not player.room:getPlayerById(data.tos[1][1]):hasSkill(self.name) and player:usedSkillTimes(self.name, Player.HistoryRound) == 0 then
      local other_hanfa = table.filter(player.room:getOtherPlayers(player),function (p)
        if p.role == "rebel" and p:hasSkill(self.name) then
          return true
        end
      end)
      if #other_hanfa > 0 then
        return true
      end
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    for _, p in ipairs(player.room:getOtherPlayers(player)) do
      if p.role == "rebel" and p:hasSkill(self.name) then
        p:addSkillUseHistory(self.name, 1)
      end
    end
    local to = room:getPlayerById(data.tos[1][1])
    for key, p in pairs(room:getOtherPlayers(player)) do
        if p.role == "rebel" and p:hasSkill(self.name) then
            local use = room:askForUseCard(p, "slash", "slash", "hulao_hanfa_tip::"..to.id, true, {must_targets = {to.id}, bypass_distances = true})
            if use then
                room:useCard(use)
            end
        end
     end
  end
}
Fk:addSkill(hulao_hanfa)

--pvp虎牢关吕布 

--pve修罗神话吕布
local l_shenfa = fk.CreateTriggerSkill{
  name = "l_shenfa",
--   anim_type = "control",
  frequency = Skill.Compulsory,
  events = {fk.DamageInflicted,fk.EventPhaseEnd},
  can_trigger = function(self, event, target, player, data)
    if event == fk.DamageInflicted then
        return player:hasSkill(self.name) and target ~= player and data.from == player and data.damageType == fk.NormalDamage
    else
      return player:hasSkill(self.name) and target == player and (player.phase == Player.Start or player.phase == Player.Finish)
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:notifySkillInvoked(player, self.name, "control")
    if event == fk.DamageInflicted then
        local dtype = table.random({fk.ThunderDamage,fk.FireDamage})
        data.damageType = dtype
    else
      table.forEach(room:getOtherPlayers(player),function (p)
        if not p.chained and not GensLimts:isSameCamp(player,p) then
          p:setChainState(true)
        end
      end)
    end
  end,
}
Fk:addSkill(l_shenfa)

local l_shenbian = fk.CreateTriggerSkill{
  name = "l_shenbian",
--   anim_type = "control",
  frequency = Skill.Compulsory,
  events = {fk.AfterDrawNCards},
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(self.name) and target ~= player and not GensLimts:isSameCamp(player,target)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:notifySkillInvoked(player, self.name, "control")
    room:setPlayerMark(target,"randcards",1)

    local playercards = target.player_cards[Player.Hand]
    table.forEach(playercards,function (cid)
      local card = Fk:getCardById(cid)
      if table.contains(playercards, card.id) and not table.contains({Card.TypeEquip}, card.type) then
        room:setCardMark(card,"randcard",table.random(randhandlist))
      end
    end)
  end,
  refresh_events = {fk.EventPhaseEnd},
  can_refresh = function (self, event, target, player, data)
      return player.phase == Player.Play and player:getMark("randcards") == 1
  end,
  on_refresh = function (self, event, target, player, data)
    local room = player.room
    room:setPlayerMark(player,"randcards",0)
    table.forEach(player.player_cards[Player.Hand],function (cid)
      local card = Fk:getCardById(cid)
      if card:getMark("randcard") ~= 0 then
        room:setCardMark(card,"randcard",0)
      end          
    end)
  end
}
local l_shenbian_randhand = fk.CreateFilterSkill{
  name = "#l_shenbian_randhand",
  card_filter = function(self, card, player)
    return player:getMark("randcards") == 1 and card:getMark("randcard") ~= 0
  end,
  view_as = function(self, card) 
    return Fk:cloneCard(card:getMark("randcard"), card.suit, card.number)
  end,
}
l_shenbian:addRelatedSkill(l_shenbian_randhand)
Fk:addSkill(l_shenbian)

local addMaxHp = function (room,who,num)
  who.maxHp = who.maxHp + num
  who.hp = who.hp + num
  room:broadcastProperty(who, "maxHp")
  room:broadcastProperty(who, "hp")
end

local deadRwds = function (room,name)
  for _, p in ipairs(room.alive_players) do
    if p.role == "rebel" then
      local choices = {"hulao_draw2", "Cancel"}
      if p:isWounded() then
        table.insert(choices, 2, "hulao_heal")
      end
      local choice = room:askForChoice(p, choices, name)
      if choice == "hulao_draw2" then p:drawCards(2, name)
      else room:recover{ who = p, num = 1, skillName = name } end
    end
  end
end

local deadBury = function (who)
  who:setCardUseHistory("")
  who:throwAllCards()
  who:throwAllMarks()
  who:clearPiles()
  who:reset()
end

local rm_general = function (generals,g)
  for i = 1, #generals do
    if g.general == generals[i].name then
      table.remove(generals,i)
      return true
    end
  end
  return false
end

local chkCanPlay = function (room,allgenerals)
  for _, p in ipairs(room.players) do
    if p.id > 0 and not istest and not rm_general(allgenerals,p) then
      if p.role ~= "lord" then
        room:doBroadcastNotify("ShowToast", "自由选将不在白名单。游戏结束")
        room:gameOver("lord")
        return false
      end
    end 
  end
  return true
end

--虎牢关模式
local hulao_rule = fk.CreateTriggerSkill{
  name = "#hulao_rule",
  priority = 0.001,
  refresh_events = {fk.GameStart, fk.Deathed,fk.HpChanged,fk.TurnEnd},
  can_refresh = function(self, event, target, player, data)
    if event == fk.GameStart then
      return true
    elseif event == fk.Deathed then
      -- body
      return target == player
    elseif event == fk.HpChanged then
      if cur_mode == "pve" and player.role == "lord" then
        local nextformlist = {15,9}
        local curform = player:getMark("form_phase")
        local nextformhp = nextformlist[curform+1]
        if nextformhp and player.hp < nextformhp then
          local sel_form = 0
          for i, hp in ipairs(nextformlist) do
            if player.hp < hp then
              -- body
              sel_form = sel_form + 1
            end
          end
          if sel_form > curform then
            player.room:setPlayerMark(player,"form_phase",sel_form)
            return true
          end
        end
      end
    else
      return player == target
    end
  end,
  on_refresh = function(self, event, target, player, data)
    local room = player.room
    if event == fk.GameStart then
      if player.role == "lord" then
        if cur_mode == "pvp" then
          room:handleAddLoseSkills(player, "wushuang|mashu", nil, false)
          room:setTag("SkipNormalDeathProcess", true)
          if #room.players == 4 then
            local allgenerals = room.logic.allgenerals
            if not chkCanPlay(room,allgenerals) then return end 
          end
        elseif cur_mode == "pve" then
          local allgenerals = room.logic.allgenerals
          if not chkCanPlay(room,allgenerals) then return end 
          room:setPlayerMark(player,"form_phase",0)
          room:handleAddLoseSkills(player, "mashu", nil, false)
          room:setTag("SkipNormalDeathProcess", true)
        end
        -- Config.bgmFile = AppPath.."packages/lang/audio/hulao_bgm.mp3"
      elseif player.role == "rebel" then
        room:handleAddLoseSkills(player, "hulao_mengjun", nil, false)
        if cur_mode == "pve" then
          room:handleAddLoseSkills(player, "hulao_hanfa|hulao_hanshi", nil, false)
          addMaxHp(room,player,2)
        end
      else
        addMaxHp(room,player,3)
      end
    elseif event == fk.Deathed then
      if cur_mode == "pve" then
        if player.role == "rebel" then
          deadBury(player)
          room:setPlayerMark(player,"@zhengbei",7)
          deadRwds(room,self.name)
        end
      else
        deadRwds(room,self.name)
      end
    elseif event == fk.HpChanged then
      local curform = player:getMark("form_phase")
      if curform >= 1 and not player:hasSkill("l_shenfa") then
        room:changeMaxHp(player, -6)
        room:handleAddLoseSkills(player, "l_shenfa", nil, false)
      end
      if player:getMark("form_phase") >= 2 and not player:hasSkill("l_shenbian") then
        room:changeMaxHp(player, -6)
        room:handleAddLoseSkills(player, "l_shenbian", nil, false)
        local current = player.room.logic:getCurrentEvent()
        local damage_event = current:findParent(GameEvent.Damage)
        if not damage_event then return end
        local Turn_event = damage_event:findParent(GameEvent.Turn)
        if not Turn_event then return end
        damage_event:addExitFunc(function()
          player:gainAnExtraTurn(true)
          Turn_event:shutdown()
        end)
      end
    else
      if cur_mode == "pvp" then return end
      local deadPlayers = {}
      for _, pr in ipairs(room.players) do
        if pr.dead and pr.role == "rebel" and pr:getMark("@zhengbei") > 0 then
          table.insert(deadPlayers,pr)
        end
      end
      if #deadPlayers > 0 then
        for _, diep in ipairs(deadPlayers) do
          room:removePlayerMark(diep,"@zhengbei",1)
          if diep:getMark("@zhengbei") <= 0 then
            room:revivePlayer(diep, false)
            room:drawCards(diep, 4,self.name)
          end
        end
      end
    end
  end,
}
Fk:addSkill(hulao_rule)
local hulao_mode = fk.CreateGameMode{
  name = "hulao_mode",
  minPlayer = 4,
  maxPlayer = 6,
  rule = hulao_rule,
  logic = hulao_getLogic,
  surrender_func = function(self, playedTime)
    local surrenderJudge = { { text = "time limitation: 10s", passed = playedTime >= 10 } }
    if Self.role ~= "lord" then
      table.insert(surrenderJudge, { text = "only you alive", passed = #Fk:currentRoom().alive_players <= 2 })
    end
    return surrenderJudge
  end,
}

Fk:loadTranslationTable{
  ["hulao_mode"] = "虎牢关模式",
  ["throwallcards_rec"] = "丢弃所有手牌令其回1血",
  ["throwallcards_draw"] = "丢弃任意张牌再摸等量的牌",
  ["hulao_mengjun"] = "汉盟",
  [":hulao_mengjun"] = "全部拥有【汉盟】技能角色每轮限发动1次，当有【汉盟】角色进入濒死。其他【汉盟】从以下选项二选一并在选完后移除该选项：1.弃所有手牌恢复其1点体力。2.弃所有手牌摸等量牌 ",

  ["#hulao_rule"] = "挑选遗产",
  ["hulao_draw2"] = "摸两张牌",
  ["hulao_heal"] = "回复1点体力",

  ["@zhengbei"] = "整备",

  ["hulao_hanshi"] = "汉誓",
  [":hulao_hanshi"] = "摸牌阶段你多摸1张牌且其他拥有【汉誓】角色也多摸1张牌",
  ["#hulao_hanshi_hmax"] = "汉誓",
  ["hulao_hanfa"] = "汉伐",
  [":hulao_hanfa"] = "全部拥有【汉伐】技能角色每轮限发动1次，当有【汉伐】角色对没有【汉伐】角色使用唯一目标【杀】结算后，其他拥有【汉伐】角色可以依次对其使用1张【杀】",
  ["hulao_hanfa_tip"] = "汉伐：是否对 %dest 使用杀",

  ["l_shenfa"] = "神罚",
  [":l_shenfa"] = "锁定技，你对其他角色造成普通伤害为随机的【火】【雷】属性伤害，准备阶段你横置所有其他阵营角色",

  ["l_shenbian"] = "神变",
  [":l_shenbian"] = "锁定技，其他角色摸牌阶段结束后。其每张手牌重置为随机牌名（延时锦囊与装备牌除外）",
  ["#l_shenbian_randhand"] = "神变",

  ["time limitation: 10s"] = "游戏时长达到10秒",
  ["only you alive"] = "仅剩你存活",

  [":hulao_mode"] = desc_hulao_mode,
}

return hulao_mode
